package structure.decoration;

/**
 *
 */
public class Client {
    public static void main(String[] args) {
        //创建两种基本类型的咖啡（被装饰对象）
        Drink basicDrink = new BasicDrink(10);
        //用配料作为装饰者，包装咖啡，为其加配料,可以被多个装饰者修饰
        Drink milk = new Milk(basicDrink);

        Drink sugar = new Sugar(milk);
        System.out.println(sugar.calculateCost());


    }
}
